package com.mai.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mai.dao.UserMaiMapper;
import com.mai.entity.UserMai;

@Service
public class UserMaiService {
	@Autowired
	private UserMaiMapper um;

	/**
	 * 添加用户
	 */
	public boolean addUser(UserMai user) {
		um.addUser(user);
		return true;
			
	}
	
	/**
	 * 根据用户名查询
	 */
	public UserMai selectUserByName(String name) {
		return um.selectUserByName(name);
	}
	
	/**
	 * 修改用户密码
	 */
	public boolean resetPassword(UserMai user) {
		um.resetPassword(user);
		return true;
	}

}
